package com.lancer.cloud.common.aop;

import java.lang.reflect.Method;
import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.Signature;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.reflect.MethodSignature;
import org.springframework.stereotype.Component;

/**
 * 操作日志切面
 *
 * @author caijinbang
 * @date 2019-06-15 17:40
 */
@Slf4j
@Aspect
@Component
public class OperationLogAspect {

    @Around("execution(public com.lancer.cloud.common.response.ApiResponse *(..))")
    public Object handlerMethodOperate(ProceedingJoinPoint joinPoint) throws Throwable{

        Object reuslt = null;

        Signature signature = joinPoint.getSignature();

        MethodSignature methodSignature = (MethodSignature) signature;

        Method method = methodSignature.getMethod();
        return  reuslt;
    }

}
